gdi32: remove pub globs

This commit is contained in:
Evan Martin
2025-05-27 10:30:11 -07:00
parent 59359a77c6
commit 761f1c2a2f
10 changed files with 39 additions and 31 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
//! The bitmap file/memory format and pixel buffers.
use super::COLORREF;
use crate::draw::COLORREF;
use memory::{Extensions, ExtensionsMut, Mem};
use std::ops::Range;
use win32_winapi::RECT;
+6 -5
View File
@@ -1,22 +1,23 @@
//! GDI functions working with bitmaps.
//! The general bitmap-related structures are in bitmap.rs.
use super::{
COLORREF, HDC, HGDIOBJ, Object,
use crate::{
HDC, HGDIOBJ, Object,
bitmap::{BI, Bitmap, PixelData, PixelFormat},
get_state,
state::GDIHandles,
draw::COLORREF,
state::{GDIHandles, get_state},
};
use memory::{Extensions, Mem};
use win32_system::System;
use win32_winapi::{POINT, RECT};
pub use super::bitmap::BITMAPINFOHEADER;
pub use crate::bitmap::BITMAPINFOHEADER;
pub type HBITMAP = HGDIOBJ;
/// This is only used as serialization in GetObject, and is separate from the various
/// bitmap file headers defined in bitmap.rs.
#[repr(C)]
#[derive(Clone)]
pub struct BITMAP {
pub bmType: u32,
+4 -3
View File
@@ -1,7 +1,8 @@
use super::{
DCHandles, GDIHandles, HGDIOBJ, R2,
use crate::{
HGDIOBJ,
bitmap::{self, Bitmap, PixelData},
get_state,
draw::R2,
state::{DCHandles, GDIHandles, get_state},
};
use std::{cell::RefCell, rc::Rc};
use win32_system::System;
+1 -1
View File
@@ -1,6 +1,6 @@
//! Pens, brushes, color.
use super::{HDC, HGDIOBJ, Object, get_state};
use crate::{HDC, HGDIOBJ, Object, state::get_state};
use win32_system::System;
use win32_winapi::{
POINT, RECT,
+5 -16
View File
@@ -13,20 +13,9 @@ mod object;
mod palette;
mod state;
mod text;
pub use bitmap_api::*;
pub use dc::*;
pub use draw::*;
pub use object::*;
pub use palette::*;
pub use state::*;
pub use text::*;
use win32_system::System;
pub fn get_state(sys: &dyn System) -> std::cell::RefMut<State> {
type SysState = std::cell::RefCell<State>;
sys.state(&std::any::TypeId::of::<SysState>())
.downcast_ref::<SysState>()
.unwrap()
.borrow_mut()
}
pub use dc::{DC, DCTarget, HDC};
pub use draw::{Brush, COLORREF, fill_rect};
pub use object::{HGDIOBJ, LOWEST_HGDIOBJ, Object};
pub use palette::PALETTEENTRY;
pub use state::{GDIHandles, State, get_state};
+7 -1
View File
@@ -1,4 +1,10 @@
use super::{BITMAP, Brush, COLORREF, HDC, Pen, bitmap::Bitmap, get_state};
use crate::{
HDC,
bitmap::Bitmap,
bitmap_api::BITMAP,
draw::{Brush, COLORREF, Pen},
state::get_state,
};
use memory::ExtensionsMut;
use std::{cell::RefCell, rc::Rc};
use win32_system::System;
+1 -1
View File
@@ -1,4 +1,4 @@
use super::{HDC, HGDIOBJ};
use crate::{HDC, HGDIOBJ};
use win32_system::System;
use win32_winapi::HANDLE;
+11 -1
View File
@@ -1,5 +1,7 @@
use super::{DC, DCTarget, HDC, HGDIOBJ, LOWEST_HGDIOBJ, Object, ScreenDCTarget, bitmap::Bitmap};
use crate::dc::{DC, DCTarget, HDC, ScreenDCTarget};
use crate::{HGDIOBJ, LOWEST_HGDIOBJ, Object, bitmap::Bitmap};
use std::{cell::RefCell, rc::Rc};
use win32_system::System;
use win32_winapi::Handles;
pub struct State {
@@ -57,3 +59,11 @@ impl State {
self.screen_dc
}
}
pub fn get_state(sys: &dyn System) -> std::cell::RefMut<State> {
type SysState = std::cell::RefCell<State>;
sys.state(&std::any::TypeId::of::<SysState>())
.downcast_ref::<SysState>()
.unwrap()
.borrow_mut()
}
+2 -1
View File
@@ -1,4 +1,5 @@
use super::{CLR_INVALID, COLORREF, HDC};
pub use crate::draw::COLORREF;
use crate::{HDC, draw::CLR_INVALID};
use memory::Pod;
use win32_system::System;
use win32_winapi::{HANDLE, LPARAM, calling_convention::Array};
+1 -1
View File
@@ -1,6 +1,6 @@
use super::{DCTarget, HBRUSH, HDC, WindowType, get_state};
use builtin_gdi32 as gdi32;
use builtin_gdi32::{COLORREF, HGDIOBJ};
use gdi32::{COLORREF, HGDIOBJ};
use win32_system::System;
use win32_winapi::calling_convention::FromArg;
use win32_winapi::{HWND, RECT, Str16};